package org.akomantoso.core.data;

import java.io.IOException;

import org.akomantoso.core.data.group.ANmarker;
import org.akomantoso.core.io.Output;
import org.akomantoso.core.visitor.AKVisitor;

/**
 * The element eol (end of line) is a marker for where in the original text the line breaks. If the line breaks within a
 * word, place the element BEFORE the word and place the number of characters before the break in the attribute breakat.
 * 
 * <pre>
 * 	<xsd:element name="eol" type="eolType"/>
 * </pre>
 * 
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 * 
 * @since http://www.akomantoso.org/1.0
 */
public final class Eol extends EolType implements ANmarker {

	public static final String ELEMENT = "eol";

	/**
	 * @see org.akomantoso.core.data.EolType#writeExternal(org.akomantoso.core.io.Output)
	 */
	@Override
	public <T extends Output> void writeExternal(T out) throws IOException {
		out.writeStart(ELEMENT);
		super.writeExternal(out);
		out.writeEnd();
	}

	/**
	 * @see ec.ep.visitor.AKVisitable#accept(ec.ep.visitor.AKVisitor)
	 */
	public void accept(AKVisitor visitor) {
		visitor.visit(this);
	}

}